from dendritetics_classes import *

chromo = Cchromosome()
t1 = Ctree(chromo.genes[0])
t1.generate()
t1.add_synapse_locations()
t1.gnuplot_print(open("tree.out","w"),s=1)
t1.gene.gnuplot_print(open("gene.out","w"))
t1.diameter_vs_dist_plot(open("diam.out", "w"))

t1.generate()
t1.gnuplot_print(open("tree2.out","w"))
t1.diameter_vs_dist_plot(open("diam2.out", "w"))

t1.gene.parameters_print(open("param.out", "w"))

# tests Rall's power law of 1.5 for impedence matching
#d_p = t1.root.end_diameter
#d_c1 = t1.root.children[0].diameter
#d_c2 = t1.root.children[1].diameter
#
#print  d_p**1.5
#print   d_c1**1.5 
#print  d_c2**1.5
#print   d_c1**1.5  + d_c2**1.5 


